package com.bjtu.literatureclient.base.exceptions;

/**
 * @author caiyuli
 * @date 2020-02-18 20:04
 */
public enum ExceptionEnum {

    SUCCESS(0,"成功"),
    PARAM_ERROR(1001,"参数不正确"),
    UNKNOW_ACCOUNT(1002,"用户名或密码错误"),
    FULL_TEAM(1003,"团队人数已满"),
    USER_EXISTED(1004,"用户邮箱或者手机已经存在"),
    DB_TRANSACTION(1005,"数据库事务失败"),
    NOT_LOGGED(1006,"未登录或者登录信息过期"),
    ERROR_USERNAME(1007,"用户名错误"),
    USER_NOT_EXISTED(1008,"用户不存在"),
    PSD_ERROR(1009,"密码不正确"),
    FIELD_VACANCY(1010,"请求中缺失必要字段"),
    NO_JOURNAL_NAME(1011,"缺少期刊名"),
    BANK_PARAM(1012,"部分必要参数空白"),
    DELETE_COMPLETE_ERROR(1013,"全集不能删除"),
    EDIT_COMPLETE_ERROR(1014,"全集不能修改"),
    TITLE_BLANK(1015,"titlt 不能为空"),
    INDEX_BANK(1016,"索引号对应的结果为空"),
    INDEX_TYPE_ERROR(1017,"搜索文献类型错误或搜索结果为空"),
    JOURNAL_CN_NULL(1018,"搜索的中文期刊为空"),
    JOURNAL_EN_NULL(1019,"搜索的西文期刊为空"),
    JOURNAL_PAPER_EN_NULL(1020,"搜索的西文期刊析出文献为空"),
    JOURNAL_PAPER_CN_NULL(1021,"搜索的西文期刊析出文献为空"),
    INDEX_REDISTRIBUTION(1022,"是同一个参考文献，索引号重新分配给至客户端让其刷新索引号");
    ;

    private Integer code;
    private String message;

    ExceptionEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}